import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { CompleteUserLittleThingsDTO, GetCompletedUserLittleThingsInfoDTO, GetUserLittleThingsDTO } from './little-things.dto';
import { LittleThingsService } from './little-things.service';

@Controller({
  path: 'wechat/little-things',
  version: '1',
})
@ApiTags('恋爱清单')
export class LittleThingsController {
  constructor(private readonly littleThingsService: LittleThingsService) {}

  @Get('getUserLittleThings')
  @ApiOperation({ summary: '获取用户小事清单' })
  async getUserLittleThings(@Query() getUserLittleThings:GetUserLittleThingsDTO){
    return await this.littleThingsService.getUserLittleThings(getUserLittleThings)
  }

  @Post('completeUserLittleThings')
  @ApiOperation({ summary: '完成用户小事清单' })
  async completeUserLittleThings(@Body() completeUserLittleThings:CompleteUserLittleThingsDTO){
    return await this.littleThingsService.completeUserLittleThings(completeUserLittleThings)
  }
 
  @Get('getCompletedUserLittleThingsInfo')
  @ApiOperation({ summary: '获取用户已完成小事详情' })
  async getCompletedUserLittleThingsInfo(@Query() getCompletedUserLittleThingsInfo:GetCompletedUserLittleThingsInfoDTO){
    console.log('77889109')
    return await this.littleThingsService.getCompletedUserLittleThingsInfo(getCompletedUserLittleThingsInfo)
  }

}
